package pay

import (
	"bytes"
	"fmt"
	"github.com/gin-gonic/gin"
)

func GinFrontJump(c *gin.Context, url string) {
	html := `
<html>
<javascript>
window.location.href="%s";
</javascript>
<body>
</body>
</html>
`

	buf := new(bytes.Buffer)
	buf.WriteString(fmt.Sprintf(html, url))
	buf.WriteTo(c.Writer)
	c.Abort()
}
